#pragma once
#include "TinyMsg.h"
#include "MsgDefine.h"
#include "TinyCCDBMgr.h"
#include "TinyInstanceRT.h"
#include "TinyUser.h"

using namespace TinyCC::msg;
using namespace DBLayer;

namespace RuntimeMgr{

class CTinyCCClientMgr
{
public:
	CTinyCCClientMgr(void);
public:
	~CTinyCCClientMgr(void);
public:
	bool ProcessReceivedMsg(CTinyMsg& inMsg,CTinyMsg& OutMsg);
public:
	bool SingleRegionLogon(CTinyMsg& inMsg,CTinyMsg& OutMsg);
private:
	std::map<std::string,CTinyInstanceRT*> m_InstanceRTMap;
	std::map<std::string,CTinyUser*> m_UserMap;
public:
	CTinyInstanceRT* getInstanceByName(std::string name);
	CTinyUser* getUserByName(std::string name);
	void processTimer(std::string timerID);
	std::string m_connectionCheckTimer;
};
}
